﻿using System;
using System.Collections.Generic;
using System.Text;
using Cn.Cellula.Model;
using Cn.Edwon.Biz;
using Cn.Cellula.Model.Content;

namespace Cn.Cellula.Biz.Port {
    public interface IVoteBiz:IBiz {
        /// <summary>
        /// 根据votekey获取全部item
        /// </summary>
        /// <param name="rVoteKey"></param>
        /// <returns></returns>
        IList<TVoteItemEO> LoadItemsByVote(String rVoteKey);
        /// <summary>
        /// 获取所有Vote
        /// </summary>
        /// <param name="rOwnerKey"></param>
        /// <returns></returns>
        IList<VVoteEditListEO> LoadAllVote(String rOwnerKey);
        /// <summary>
        /// 删除投票
        /// </summary>
        /// <param name="rKeys"></param>
        void DeleteVote(IList<String> rKeys, String rOwnerKey);
        /// <summary>
        /// 删除投票项
        /// </summary>
        /// <param name="rKeys"></param>
        void DeleteVoteItem(IList<String> rKeys);
        /// <summary>
        /// 开启投票
        /// </summary>
        /// <param name="rKeys"></param>
        void OpenVote(IList<String> rKeys);
        /// <summary>
        /// 关闭投票
        /// </summary>
        /// <param name="rKeys"></param>
        void CloseVote(IList<String> rKeys);


        /// <summary>
        /// 是否已经投票
        /// </summary>
        /// <param name="rVoteKey"></param>
        /// <param name="rUserId"></param>
        /// <param name="rIp"></param>
        Boolean IfVoted(String rVoteKey, String rUserId, String rIp);

    }
}
